package com.mx.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class MyMvcConfig implements WebMvcConfigurer {

    //-----------------调用LoginHandlerInterceptor-----------------------//
    @Override//拦截器
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new LoginHandlerInterceptor()).addPathPatterns("/user/*");
        //.excludePathPatterns("/admin","/admin/login");//"/css/*","/img/*","/lib/*",
    }
}
